// 枪
public class Gun {
    public String name;
    public Clip clip;// 持有弹夹


    public Gun() {
    }

    public Gun(String name) {
        this.name = name;
    }

    public Gun(String name, Clip clip) {
        this.name = name;
        this.clip = clip;
    }

    // 开火
    public void openFire(People laoBa) {
        Cartridge cartridge = clip.popCartridge();
        if (cartridge != null) {
            // 子弹杀人
            cartridge.killPeople(laoBa);
        } else {
            System.out.println("子弹打空了");
        }
    }
}
